﻿@model MessageModel
@{
    var x = Html.X();
}
@(
    x.Window().Layout(LayoutType.Fit).Title("发送消息")
    .CloseAction(CloseAction.Destroy).MinHeight(300)
    .Width(700).Items(
        x.FormPanel().Default()
            .Layout(LayoutType.Column).Items(
            x.FieldContainer().Layout(LayoutType.HBox).FieldLabel("收件人").Items(x.TextField().Name("RecipientName").Flex(1), x.Button().Icon(Icon.Cake)).ColumnWidth(.5).Padding(4),
            x.HtmlEditorFor(m => m.Content).ColumnWidth(1).Padding(4)
            )
            .Buttons(

                x.Button().Text("提交").Icon(Icon.Disk).Hidden(false).DirectEvents(de =>
                {
                    de.Click.Before = "App.Edit.submitReady";
                    de.Click.Action = "Save";
                    de.Click.EventMask.ShowMask = true;
                    de.Click.EventMask.Msg = "正在提交...";
                    de.Click.Success = "App.Edit.PostBackSuccess";
                }),
                    x.Button().Text("关闭").Icon(Icon.Cancel).OnClientClick("App.Edit.CloseWindow(this)")
                ))
)
